<!--
    pageName: 物资管理系统首页
    author: 徐一贺
    dept: 机械设计院 智能控制设计所 智能控制设计科
    tel: 忠旺电信 18941916590
    createDate：2020-07-02 11:06:52
    lastUpdateDate：2021-01-04 11:07:23
    更新内容：
            1、增加跨年显示数据方式以及年份显示。
            2、增加中间数据支持跨年查询数据。
            3、新增首页不可查询未来的数据的文字提示。
            4、新增上一月和下一月跨年的功能。
-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header"></head>
<link rel="stylesheet" th:href="@{/css/index.css}">
<body class="hold-transition skin-blue sidebar-mini" styl四e="padding: 0px;margin: 0px">
<div style="width: 100%;text-align: center;padding-top: 5px">
    <div class="left-div"
         th:style="|background-image:url(@{/img/bglogin.jpg});background-position:right top;background-clip:content-box|">
        <div style=" background-color: rgba(200,200,200,0.8);padding-left: 10px;padding-right: 10px;height: 1460px">
            <div class="top-div">
                <div class="top-img-div"
                     th:style="|background-image:url(@{/img/storeroom6.jpg});background-position:65% 15%;background-size:1000%;background-clip:content-box|"></div>
                <div class="top-title-div">
                    <h1 class="top-h1">外购件库</h1>
                </div>
            </div>
            <div class="total-div">
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #307196;color: white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy1" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">外购件库存总金额（含辽阳、营口机械备件库）</span>
                            <span class="info-box-number text-left"><small
                                    id="inventoryInStockTotalAmountByPurchaseAndHalf">加载中...</small></span>
                        </div>
                        <a href="/purInvQuery/index/all" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#3c8dbc;text-align: right;">查看明细
                            <i class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #009abf;color:white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy2" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">集团物资部外购件库（库存金额，项目在库金额，库存在库金额）</span>
                            <span class="info-box-number text-left"><small
                                    >（<span id="inventoryTotalAmountByPurchase">加载中...</span>，<span
                                    id="projectInStockTotalAmountByPurchase">加载中...</span>，<span
                                    id="inventoryInStockTotalAmountByPurchase">加载中...</span>）</small></span>
                        </div>
                        <a href="/purInvQuery/index/group" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#19b3d8;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
<!--                <div class="info-box ">-->
<!--                    <span class="info-box-icon" style="background-color: #36567e;color: white"><i-->
<!--                            class="glyphicon glyphicon-yen"></i></span>-->
<!--                    <div class="info-box-content small-box small-box-diy3" style="padding: 0">-->
<!--                        <div class="inner">-->
<!--                            <span class="info-box-text text-left">集团物资部外购件库项目在库金额</span>-->
<!--                            <span class="info-box-number text-left"><small id="projectInStockTotalAmountByPurchase">加载中...</small></span>-->
<!--                        </div>-->
<!--                        <a href="/purInvQuery/index/groupByPro" class="small-box-footer"-->
<!--                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#436b9d;">查看明细 <i-->
<!--                                class="fa fa-arrow-circle-right"></i></a>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="info-box ">-->
<!--                    <span class="info-box-icon" style="background-color: #00bbe8;color: white"><i-->
<!--                            class="glyphicon glyphicon-yen"></i></span>-->
<!--                    <div class="info-box-content small-box small-box-diy4" style="padding: 0">-->
<!--                        <div class="inner">-->
<!--                            <span class="info-box-text text-left">集团物资部外购件库库存在库金额</span>-->
<!--                            <span class="info-box-number text-left"><small id="inventoryInStockTotalAmountByPurchase">加载中...</small></span>-->
<!--                        </div>-->
<!--                        <a href="/purInvQuery/index/groupByInv" class="small-box-footer"-->
<!--                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#65d0ea;">查看明细 <i-->
<!--                                class="fa fa-arrow-circle-right"></i></a>-->
<!--                    </div>-->
<!--                </div>-->
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #36567e;color: white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy3" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">辽阳机械备件库金额，营口机械备件库金额</span>
                            <span class="info-box-number text-left"><small>（<span id="mecLiaoYang">加载中...</span>，<span
                                    id="mecYingKou">加载中...</span>）</small></span>
                        </div>

                        <a href="#" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#436b9d;">
                            &nbsp;
                        </a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #00bbe8;color: white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy4" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">辽阳机械备件消耗品库金额，营口机械备件消耗品库金额</span>
                            <span class="info-box-number text-left"><small>（<span id="mecLiaoYangConsWarehouse">加载中...</span>，<span
                                    id="mecYingKouConsWarehouse">加载中...</span>）</small></span>
                        </div>
                        <a href="#" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#65d0ea;">
                            &nbsp;
                        </a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #0a2a54;color: white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy5" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">辽阳机械备件油漆库金额，营口机械备件油漆库金额</span>
                            <span class="info-box-number text-left"><small>（<span id="mecLiaoYangPaintWarehouse">加载中...</span>，<span
                                    id="mecYingKouPaintWarehouse">加载中...</span>）</small></span>
                        </div>
                        <a href="#" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#16427b;">
                            &nbsp;
                        </a>
                    </div>
                </div>

            </div>
            <div class="box box-primary">
                <div class="box-header with-border">
                    <button onclick="purMonthPre()" style="border:none;background-color: transparent;outline: none;"
                            class="text-primary">
                        <i class="fa fa-fw fa-arrow-left"></i>
                        前一月
                    </button>
                    <h3 class="box-title" id="lbl_purMonth">三月数据</h3>
                    <button onclick="purMonthNext()" style="border:none;background-color: transparent;outline: none;"
                            class="text-primary">
                        后一月
                        <i class="fa fa-fw fa-arrow-right text-primary"></i>
                    </button>
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i
                                class="fa fa-minus"></i>
                        </button>
                        <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i>
                        </button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body" id="pur_middle">
                    <div class="row" style="text-align: center">
                        <div class="col-md-5 col-md-offset-1">
                            <div class="bg-blue card-body" style=" position: relative;background: #0073b7!important;">
                                <a id="btn_purWarehousingAmountByMonth" title="点击查看详细">
                                    <i class="fa fa-fw fa-jpy" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;
                                                                color: #FFFFFF"></i>
                                </a>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="purWarehousingAmountByMonth">
                                加载中...</h3>
                            <p style="margin: 0px">集团物资部月入库金额</p>
                        </div>
                        <div class="col-md-5 col-md-offset-1">
                            <div class="bg-aqua card-body" style=" position: relative;background: #00c0ef!important;">
                                <a id="btn_purOutWarehouseAmountByMonth" title="点击查看详细">
                                    <i class="fa fa-fw fa-jpy" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;
                                                                color: #FFFFFF"></i>
                                </a>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="purOutWarehouseAmountByMonth">
                                加载中...</h3>
                            <p style="margin: 0px">集团物资部月出库金额</p>
                        </div>

                    </div>
                    <div class="row" style="text-align: center">
                        <div class="col-md-4">
                            <div class="bg-light-blue card-body"
                                 style=" position: relative;background:#3c8dbc!important;">
                                <a id="btn_purInvProAmountByMonth" title="点击查看详细">
                                    <i class="fa fa-fw fa-credit-card" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;
                                                                color: #FFFFFF"></i>
                                </a>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom:5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px" id="purInvProAmountByMonth">加载中...</h3>
                            <p style="margin: 0px">月库存划项目金额</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-blue card-body" style=" position: relative;background:#0073b7!important;">
                                <a id="btn_purChangeAmountByMonth" title="点击查看详细">
                                    <i class="fa fa-fw fa-random" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;
                                                                color: #FFFFFF"></i>
                                </a>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="purChangeAmountByMonth">
                                加载中...</h3>
                            <p style="margin: 0px">月串料金额</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background: #00a7d0!important;">
                                <a id="btn_purProInvAmountByMonth" title="点击查看详细">
                                    <i class="fa fa-fw fa-credit-card" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;
                                                                color: #FFFFFF"></i>
                                </a>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="purProInvAmountByMonth">
                                加载中...</h3>
                            <p style="margin: 0px">月项目划库存金额</p>
                        </div>
                    </div>
                    <!--<div class="row">-->
                    <!--<a href="#" class="text-primary pull-right"-->
                    <!--style="margin: 5px;text-decoration:underline;font-weight: bold">查看更多</a>-->
                    <!--</div>-->
                </div>

            </div>

            <div class="box box-info" style="border: 0px">
                <div class="box-header with-border" style="background-color: #63818A">
                    <div class="info-box" style="background-color: #63818A">
                        <span class="info-box-icon" style="background: transparent;color: #FFFFFF;font-size: 80px"><i
                                class="fa fa-bookmark-o"></i></span>
                        <div class="info-box-content" style="color: #FFFFFF;text-align: left">
                            <span class="info-box-text text-left"> <h2>待处理事项</h2></span>
                            <span class="info-box-text text-left">ITEMS TO BE DONE</span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>

                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <ul class="products-list product-list-in-box" id="purchaseList">
                        <li class="item" style="width: 100%" name="purChangeNotExec"><label
                                class="pull-left">未执行的串料申请</label><label
                                class="badge bg-yellow pull-right" id="purChangeCount">10</label></li>
                        <li class="item" style="width: 100%" name="purInvProNotExec"><label class="pull-left">未执行的库存划项目标记</label><label
                                class="badge bg-yellow pull-right" id="purInvProCount">10</label></li>
                        <li class="item" style="width: 100%" name="purProInvNotExec"><label class="pull-left">未执行的项目划库存标记</label><label
                                class="badge bg-yellow pull-right" id="purProInvCount">10</label></li>
                        <li class="item" style="width: 100%" name="purAdjustNotExec"><label
                                class="pull-left">未执行的待审批数据</label><label
                                class="badge bg-yellow pull-right" id="purApprovalPendingCount">10</label></li>
<!--                        <li class="item" style="width: 100%" name="purAppointNotExecByPur"><label class="pull-left">外购件未指定的使用库存计划</label><label-->
<!--                                class="badge bg-yellow pull-right" id="purNotSpecifiedCount">10</label></li>-->
<!--                        <li class="item" style="width: 100%" name="purAppointNotExecByAss"><label class="pull-left">外协件未指定的使用库存计划</label><label-->
<!--                                class="badge bg-yellow pull-right" id="purNotSpecifiedCount2">10</label></li>-->
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="center-div"
         th:style="|background-image:url(@{/img/storeroom3.jpg});background-position:right top;background-clip:content-box|">
        <div style=" background-color: rgba(200,200,200,0.8);padding-left: 10px;padding-right: 10px;height: 1460px">
            <div class="top-div">
                <div class="top-img-div"
                     th:style="|background-image:url(@{/img/bglogin10.png});background-position:center;background-size:1000%;background-clip:content-box|"></div>
                <div class="top-title-div">
                    <h1 class="top-h1">原料库</h1>
                </div>
            </div>
            <div class="total-div">
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #975050;color: white"><i
                            class="fa fa-text-width"></i></span>
                    <div class="info-box-content small-box small-box-diy6" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left"
                                  style="text-transform: lowercase">钢材总重量（a库，b库，营口库）</span>
                            <span class="info-box-number text-left"><small
                                    id="steelTotalWeight">加载中...</small><small>（<span
                                    id="matLiaoYangA">加载中...</span>，<span id="matLiaoYangB">加载中...</span>，<span
                                    id="matYingKou">加载中...</span>）</small></span>
                        </div>
                        <a href="/matInvManage/complex/lists/1" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#bd6464;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #e06363;color: white"><i
                            class="fa fa-text-width"></i></span>
                    <div class="info-box-content small-box small-box-diy7" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left"
                                  style="text-transform: lowercase">库存板材量（a库，b库，营口库）</span>
                            <span class="info-box-number text-left"><small id="boardTotalWeight">加载中...</small>
                            <small>（<span id="boardLiaoYangA">加载中...</span>，<span
                                    id="boardLiaoYangB">加载中...</span>，<span id="boardYingKou">加载中...</span>）</small>
                            </span>
                        </div>
                        <a href="/matInvManage/complex/lists/2" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#ff8989;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #a72e2e;color:white"><i
                            class="fa fa-text-width"></i></span>
                    <div class="info-box-content small-box small-box-diy8" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left"
                                  style="text-transform: lowercase">库存型材量（a库，b库，营口库）</span>
                            <span class="info-box-number text-left">
                                <small id="profileTotalWeight">加载中...</small>
                                <small>（<span id="profileLiaoYangA">加载中...</span>，<span
                                        id="profileLiaoYangB">加载中...</span>，<span
                                        id="profileYingKou">加载中...</span>）</small>
                            </span>
                        </div>
                        <a href="/matInvManage/complex/lists/3" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#ce3e3e;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #fd6363;color: white"><i
                            class="fa fa-text-width"></i></span>
                    <div class="info-box-content small-box small-box-diy9" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left"
                                  style="text-transform: lowercase">常用备件量（a库，b库，营口库）</span>
                            <span class="info-box-number text-left">
                                <small id="sparePartTotalWeight">加载中...</small>
                                <small>（<span id="sparePartLiaoYangA">加载中...</span>，<span
                                        id="sparePartLiaoYangB">加载中...</span>，<span id="sparePartYingKou">加载中...</span>）</small>
                            </span>
                        </div>
                        <a href="/matInvManage/complex/lists/4" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#ff8989;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #6a0b0b;color: white"><i
                            class="fa fa-text-width"></i></span>
                    <div class="info-box-content small-box small-box-diy10" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left"
                                  style="text-transform: lowercase">项目总重量（a库，b库，营口库）</span>
                            <span class="info-box-number text-left">
                                <small id="projectTotalWeight">加载中...</small>
                                <small>（<span id="projectLiaoYangA">加载中...</span>，<span
                                        id="projectLiaoYangB">加载中...</span>，<span
                                        id="projectYingKou">加载中...</span>）</small>
                            </span>
                        </div>
                        <a href="/matInvManage/complex/lists/5" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#840e0e;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
            </div>
            <div class="box box-primary">
                <div class="box-header with-border">
                    <button onclick="rawMatMonthPre()" style="border:none;background-color: transparent;outline: none;"
                            class="text-primary">
                        <i class="fa fa-fw fa-arrow-left"></i>
                        前一月
                    </button>
                    <h3 id="lbl_rawMatMonth" class="box-title">三月数据</h3>
                    <button onclick="rawMatMonthNext()" style="border:none;background-color: transparent;outline: none;"
                            class="text-primary">
                        后一月
                        <i class="fa fa-fw fa-arrow-right text-primary"></i>
                    </button>
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i
                                class="fa fa-minus"></i>
                        </button>
                        <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i>
                        </button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div class="row" style="text-align: center">
                        <div class="col-md-5 col-md-offset-1">
                            <div class="bg-orange-active card-body"
                                 style=" position: relative;background-color: #6a0b0b !important">
                                <a id="matIn">
                                    <i class="fa fa-fw fa-sign-in" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                color: white;
                                                                right: 0;"></i>
                                </a>

                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="rawMatInTotalWeight">
                                加载中...</h3>
                            <p style="margin: 0px">入库量</p>
                        </div>
                        <div class="col-md-5 col-md-offset-1">
                            <div class="bg-red card-body"
                                 style=" position: relative;background-color: #ff8989 !important">
                                <a id="matOut">
                                    <i class="fa fa-fw fa-sign-out" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                color: white;
                                                                right: 0;"></i>
                                </a>

                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="rawMatOutTotalWeight">
                                加载中...</h3>
                            <p style="margin: 0px">出库量</p>
                        </div>

                    </div>
                    <div class="row" style="text-align: center">
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #bd6464  !important">
                                <a id="consumedInv">
                                    <i class="fa fa-fw  fa-hourglass-half" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                color: white;
                                                                bottom: 0;
                                                                right: 0;"></i>
                                </a>

                            </div>
                            <hr style="margin-top: 5px;margin-bottom:5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="rawMatConsumeTotalWeight">
                                加载中...</h3>
                            <p style="margin: 0px">消耗库存量</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #963023  !important">
                                <a id="proToInv">
                                    <i class="fa fa-fw fa-hourglass-end" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                color: white;
                                                                bottom: 0;
                                                                right: 0;"></i>
                                </a>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom:5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="rawMatSurplusTotalWeight">
                                加载中...</h3>
                            <p style="margin: 0px">项目剩余量</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #f65e5e  !important">
                                <a id="matIn1">
                                    <i class="fa fa-fw fa-database" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                color: white;
                                                                bottom: 0;
                                                                right: 0;"></i>
                                </a>

                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px" id="rawMatReturnTotalWeight">
                                加载中...</h3>
                            <p style="margin: 0px">返库量</p>
                        </div>
                    </div>
                    <!--<div class="row">-->
                    <!--<a href="#" class="text-primary pull-right"-->
                    <!--style="margin: 5px;text-decoration:underline;font-weight: bold">查看更多</a>-->
                    <!--</div>-->
                </div>
            </div>
            <div class="box box-info" style="border: 0px">
                <div class="box-header with-border" style="background-color: #63818A">
                    <div class="info-box" style="background-color: #63818A">
                        <span class="info-box-icon" style="background: transparent;color: #FFFFFF;font-size: 80px"><i
                                class="fa fa-bookmark-o"></i></span>
                        <div class="info-box-content" style="color: #FFFFFF;text-align: left">
                            <span class="info-box-text text-left"> <h2>待处理事项</h2></span>
                            <span class="info-box-text text-left">ITEMS TO BE DONE</span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>

                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <ul class="products-list product-list-in-box" id="rawMatList">
                        <li class="item" style="width: 100%" name="rawMatChangeNotExec"><label class="pull-left">未执行的串料申请</label><label
                                class="badge bg-yellow pull-right" id="rawMatChangeCount">10</label></li>
                        <li class="item" style="width: 100%" name="rawMatInvProNotExec"><label class="pull-left">未执行的库存划项目标记</label><label
                                class="badge bg-yellow pull-right" id="rawMatInvProCount">10</label></li>
                        <li class="item" style="width: 100%" name="rawMatProInvNotExec"><label class="pull-left">未执行的项目划库存标记</label><label
                                class="badge bg-yellow pull-right" id="rawMatProInvCount">10</label></li>
                        <li class="item" style="width: 100%" name="rawMatAdjustNotExec"><label class="pull-left">未执行的待审批数据</label><label
                                class="badge bg-yellow pull-right" id="rawMatApprovalPendingCount">10</label></li>
<!--                        <li class="item" style="width: 100%" name="rawMatAppointNotExec"><label class="pull-left">未指定的使用库存计划</label><label-->
<!--                                class="badge bg-yellow pull-right" id="rawMatNotSpecifiedCount">10</label></li>-->
<!--                        <li class="item" style="width: 100%" name="rawReturnMatTips"><label-->
<!--                                class="pull-left">未处理的还料提醒</label><label-->
<!--                                class="badge bg-yellow pull-right" id="rawReturnMatTipsCount">10</label></li>-->
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="right-div"
         th:style="|background-image:url(@{/img/storeroom5.jpg});background-position:center;background-clip:content-box|">
        <div style=" background-color: rgba(200,200,200,0.8);padding-left: 10px;padding-right: 10px;height: 1460px">
            <div class="top-div">
                <div class="top-img-div"
                     th:style="|background-image:url(@{/img/storeroom5.jpg});background-position:center;background-clip:content-box|"></div>
                <div class="top-title-div">
                    <h1 class="top-h1">成品库</h1>
                </div>
            </div>
            <div class="total-div">
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #16997a;color: white"><i
                            class="fa fa-pie-chart"></i></span>
                    <div class="info-box-content small-box small-box-diy11" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">制作件库存数量</span>
                            <span class="info-box-number text-left"><small
                                    id="productionPartInStockCountByHalf">加载中...</small></span>
                        </div>
                        <a href="/half/halInvManage/inventoryQuery/page/3" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#1bbf99;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i>
                        </a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #669933;color: white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy12" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">外协件库存金额</span>
                            <span class="info-box-number text-left"><small
                                    id="inventoryInStockTotalAmountByHalf">加载中...</small></span>
                        </div>
                        <a href="/half/halInvManage/inventoryQuery/page/2" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#99cc66;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #00aa00;color: white"><i
                            class="fa fa-pie-chart"></i></span>
                    <div class="info-box-content small-box small-box-diy14" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">外协件库存数量</span>
                            <span class="info-box-number text-left"><small
                                    id="projectInStockTotalAmountByHalf">加载中...</small></span>
                        </div>
                        <a href="/half/halInvManage/inventoryQuery/page/2" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#9ad09a;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #2ea370;color: white"><i
                            class="glyphicon glyphicon-yen"></i></span>
                    <div class="info-box-content small-box small-box-diy13" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">铝料库存金额</span>
                            <span class="info-box-number text-left"><small
                                    id="inventoryTotalAmountByHalf">加载中...</small></span>
                        </div>
                        <a href="/half/halInvManage/inventoryQuery/page/4" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#51cc96;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                <div class="info-box ">
                    <span class="info-box-icon" style="background-color: #006600;color: white"><i
                            class="fa fa-pie-chart"></i></span>
                    <div class="info-box-content small-box small-box-diy15" style="padding: 0">
                        <div class="inner">
                            <span class="info-box-text text-left">铝料库存重量</span>
                            <span class="info-box-number text-left"><small
                                    id="inventoryWeightByHalf">加载中...</small></span>
                        </div>
                        <a href="/half/halInvManage/inventoryQuery/page/4" class="small-box-footer"
                           style="padding: 3px 5px 2px 0px;text-align: right;background-color:#669966;">查看明细 <i
                                class="fa fa-arrow-circle-right"></i></a>
                    </div>
                </div>
            </div>
            <div class="box box-primary">
                <div class="box-header with-border">
                    <button onclick="halfMonthPre()" style="border:none;background-color: transparent;outline: none;"
                            class="text-primary">
                        <i class="fa fa-fw fa-arrow-left"></i>
                        前一月
                    </button>
                    <h3 class="box-title" id="lbl_halfMonth">三月数据</h3>
                    <button onclick="halfMonthNext()" style="border:none;background-color: transparent;outline: none;"
                            class="text-primary">
                        后一月
                        <i class="fa fa-fw fa-arrow-right text-primary"></i>
                    </button>
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i
                                class="fa fa-minus"></i>
                        </button>
                        <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i>
                        </button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div class="row" style="text-align: center">
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #166266  !important">
                                <i class="fa fa-fw fa-gg-circle" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;"></i>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px"
                                id="purAndOutsourcingWarehousingAmountByMonth">加载中...</h3>
                            <p style="margin: 0px">外协件月入库金额</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #75b37c  !important">
                                <i class="fa fa-fw fa-cart-arrow-down" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;"></i>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px"
                                id="productionPartWarehousingCountByMonth">加载中...</h3>
                            <p style="margin: 0px">制作件月入库数量</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #188418  !important">
                                <i class="fa fa-jpy" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;"></i>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px"
                                id="aluminumWarehousingCountByMonth">加载中...</h3>
                            <p style="margin: 0px">铝料月入库金额</p>
                        </div>
                    </div>
                    <div class="row" style="text-align: center">
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #75d0a6  !important">
                                <i class="fa fa-fw fa-gg" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;"></i>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px"
                                id="purAndOutsourcingOutWarehouseAmountByMonth">加载中...</h3>
                            <p style="margin: 0px">外协件月出库金额</p>
                        </div>

                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #2e878c  !important">
                                <i class="fa fa-fw fa-truck" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;"></i>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px"
                                id="productionPartOutWarehouseCountByMonth">加载中...</h3>
                            <p style="margin: 0px">制作件月出库数量</p>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-aqua-active card-body"
                                 style=" position: relative;background-color: #62a486!important">
                                <i class="fa fa-fw fa-linode" style="margin: 0 auto;
                                                                display: inline-block;
                                                                position: absolute;
                                                                top: 12.5%;
                                                                left: 0;
                                                                bottom: 0;
                                                                right: 0;"></i>
                            </div>
                            <hr style="margin-top: 5px;margin-bottom: 5px;border-top: black 2px solid">
                            <h3 class="mb-0 mt-3" style="margin: 0px;font-size: 21px"
                                id="aluminumWarehousingWeightCountByMonth">加载中...</h3>
                            <p style="margin: 0px">铝料月入库重量</p>
                        </div>
                    </div>

                    <!--<div class="row">-->
                    <!--<a href="#" class="text-primary pull-right"-->
                    <!--style="margin: 5px;text-decoration:underline;font-weight: bold">查看更多</a>-->
                    <!--</div>-->
                </div>

            </div>
            <div class="box box-info" style="border: 0px">
                <div class="box-header with-border" style="background-color: #63818A">
                    <div class="info-box" style="background-color: #63818A">
                        <span class="info-box-icon" style="background: transparent;color: #FFFFFF;font-size: 80px"><i
                                class="fa fa-bookmark-o"></i></span>
                        <div class="info-box-content" style="color: #FFFFFF;text-align: left">
                            <span class="info-box-text text-left"> <h2>待处理事项</h2></span>
                            <span class="info-box-text text-left">ITEMS TO BE DONE</span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>

                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <ul class="products-list product-list-in-box" id="halfList">
                        <li class="item" style="width: 100%" name="halfChangeNotExec"><label
                                class="pull-left">未执行的串料申请</label><label
                                class="badge bg-yellow pull-right" id="halfChangeCount"></label></li>
                        <li class="item" style="width: 100%" name="halfInvProNotExec"><label class="pull-left">未执行的库存划项目标记</label><label
                                class="badge bg-yellow pull-right" id="halfInvProCount"></label></li>
                        <li class="item" style="width: 100%" name="halfProInvNotExec"><label class="pull-left">未执行的项目划库存标记</label><label
                                class="badge bg-yellow pull-right" id="halfProInvCount"></label></li>
                        <li class="item" style="width: 100%" name="halfAdjustNotExec"><label
                                class="pull-left">未执行的待审批数据</label><label
                                class="badge bg-yellow pull-right" id="halfApprovalPendingCount"></label></li>
                        <li class="item" style="width: 100%" name="halfAllocationNotExec"><label class="pull-left">未执行的调拨数据</label><label
                                class="badge bg-yellow pull-right" id="halfAllocationCount"></label></li>
                        <li class="item" style="width: 100%" name=""><label class="pull-left"> &nbsp;</label><label
                                class="badge bg-yellow pull-right"></label></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:include="include :: footer"></div>
<script th:inline="javascript">
    /**月份数组*/
    var month = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
    /**原料库全局当前月份*/
    var rawMatCurrentMonthAll;
    /**外购件库全局当前月份*/
    var purCurrentMonthAll;
    /**成品库全局当前月份*/
    var halfCurrentMonthAll;

    var currentYearPur;
    var currentYearMat;
    var currentYearHalf;

    /**加载页面数据*/
    function loadData() {
        currentYearPur = new Date().getFullYear();
        currentYearMat = new Date().getFullYear();
        currentYearHalf = new Date().getFullYear();
        //加载外购件库顶部数据
        loadPurchaseTopData();
        //加载外购件库中部数据
        purMonthControl();
        //加载外购件库待审批项数据
        loadPurApprovalPendingData();

        //加载原料库顶部数据
        loadRawMaterialTopData();
        //加载原料库中部数据
        rawMatMonthControl();
        //加载原料库待审批项数据
        loadRawMatApprovalPendingData();

        //加载成品库顶部数据
        loadHalfTopData();
        //加载成品库中部数据
        halfMonthControl();
        //加载成品库待审批项数据
        loadHalfApprovalPendingData();
    }

    /**
     *@FunctionName:  $(function () {});
     *@Description: Jquery就绪函数，页面静态元素加载完毕后启动。
     *@Author: 徐一贺
     *@CreateDate: 2020/5/18 19:53
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    $(function () {

        loadData();
        // setInterval(function () {
        //     loadData()
        // },500);
        // //加载外购件库顶部数据
        // loadPurchaseTopData();
        // //加载外购件库中部数据
        // purMonthControl();
        // //加载外购件库待审批项数据
        // loadPurApprovalPendingData();
        //
        // //加载原料库顶部数据
        // loadRawMaterialTopData();
        // //加载原料库中部数据
        // rawMatMonthControl();
        // //加载原料库待审批项数据
        // loadRawMatApprovalPendingData();
        //
        // //加载成品库顶部数据
        // loadHalfTopData();
        // //加载成品库中部数据
        // halfMonthControl();
        // //加载成品库待审批项数据
        // loadHalfApprovalPendingData();

        /**
         *@FunctionName:  $("#purchaseList li").on('click',function () {});
         *@Description: 外购件库待处理事项页面跳转
         *@Author: 徐一贺
         *@CreateDate: 2020/5/23 13:58
         *@Phone: 18241927380
         *@Version: v 1.0.0
         */
        $("#purchaseList li").on('click', function () {
            if ($(this).attr("name") == 'purChangeNotExec') {
                if (hasP('purinv:purexeccha:view')) {
                    location.href = ctx + "purchase/change/execPage";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'purInvProNotExec') {
                if (hasP('purinv:purwaprorexec:view')) {
                    location.href = ctx + "purchase/invPro/execPage";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'purProInvNotExec') {
                if (hasP('purinv:purprowarexec:view')) {
                    location.href = ctx + "purchase/proInv/execPage";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'purAdjustNotExec') {
                if (hasP('purinv:puradjapp:view')) {
                    location.href = ctx + "purchase/adjust/review";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'purAppointNotExecByPur') {
                if (hasP('buy:planedit:view')) {
                    location.href = ctx + "buy/editReportPlan/queryPurNotSpecified";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'purAppointNotExecByAss') {
                if (hasP('buy:planedit:view')) {
                    location.href = ctx + "buy/editReportPlan/queryAssNotSpecified";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
        });
        /**
         *@FunctionName:  $("#rawMatList li").on('click',function () {});
         *@Description: 原料库待处理事项页面跳转
         *@Author: 徐一贺
         *@CreateDate: 2020/5/23 13:58
         *@Phone: 18241927380
         *@Version: v 1.0.0
         */
        $("#rawMatList li").on('click', function () {
            if ($(this).attr("name") == 'rawMatChangeNotExec') {
                if (hasP('matinv:matexeccha:view')) {
                    location.href = ctx + "material/changeOrder/check";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'rawMatInvProNotExec') {
                if (hasP('matinv:matwaprorexec:view')) {
                    location.href = ctx + "material/ityToPro/check";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'rawMatProInvNotExec') {
                if (hasP('matinv:matprowarexec:view')) {
                    location.href = ctx + "material/proToIty/check";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'rawMatAdjustNotExec') {
                if (hasP('purinv:puradjapp:view')) {
                    location.href = ctx + "material/matInvManage/rawMatJusTexaChange";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'rawMatAppointNotExec') {
                if (hasP('buy:planedit:view')) {
                    location.href = ctx + "buy/editReportPlan/queryMatNotSpecified";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'rawReturnMatTips') {
                if (hasP('matinv:retMat:view')) {
                    location.href = ctx + "material/matInvManage/matRetManage";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
        });
        /**
         *@FunctionName:  $("#rawMatList li").on('click',function () {});
         *@Description: 成品库待处理事项页面跳转
         *@Author: 徐一贺
         *@CreateDate: 2020/5/23 13:58
         *@Phone: 18241927380
         *@Version: v 1.0.0
         */
        $("#halfList li").on('click', function () {
            if ($(this).attr("name") == 'halfChangeNotExec') {
                if (hasP('halinv:halexeccha:view')) {
                    location.href = ctx + "half/halInvManage/changeExc/page";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'halfInvProNotExec') {
                if (hasP('halinv:halwaprorexec:view')) {
                    location.href = ctx + "half/halInvManage/invToProExc/page";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'halfProInvNotExec') {
                if (hasP('halinv:halprowarexec:view')) {
                    location.href = ctx + "half/halInvManage/proToInvExc/page";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'halfAdjustNotExec') {
                if (hasP('halinv:haladjapp:view')) {
                    location.href = ctx + "half/halInvManage/halfInveAdjAppr";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
            if ($(this).attr("name") == 'halfAllocationNotExec') {
                if (hasP('halwar:halallinwar:view')) {
                    location.href = ctx + "half/halWarManage/allocationInWar/page";
                } else {
                    js.modal.alert("您无权查看！");
                }
            }
        });


    });

    /**
     * 原料库开始
     */
    /**
     *@FunctionName: loadRawMaterialTopData
     *@Description: 加载原料库顶部数据
     *@Author: 徐一贺
     *@CreateDate: 2020/5/18 19:55
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function loadRawMaterialTopData() {
        $.post(
            ctx + 'overview/index/loadRawMaterialTopData',
            {},
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    $("#steelTotalWeight").html(result.data.steelTotalWeight + '吨');
                    $("#matLiaoYangA").html(result.data.matLiaoYangA + '吨');
                    $("#matLiaoYangB").html(result.data.matLiaoYangB + '吨');
                    $("#matYingKou").html(result.data.matYingKou + '吨');
                    $("#boardTotalWeight").html(result.data.boardTotalWeight + '吨');
                    $("#boardLiaoYangA").html(result.data.boardLiaoYangA + '吨');
                    $("#boardLiaoYangB").html(result.data.boardLiaoYangB + '吨');
                    $("#boardYingKou").html(result.data.boardYingKou + '吨');
                    $("#profileTotalWeight").html(result.data.profileTotalWeight + '吨');
                    $("#profileLiaoYangA").html(result.data.profileLiaoYangA + '吨');
                    $("#profileLiaoYangB").html(result.data.profileLiaoYangB + '吨');
                    $("#profileYingKou").html(result.data.profileYingKou + '吨');
                    $("#sparePartTotalWeight").html(result.data.sparePartTotalWeight + '吨');
                    $("#sparePartLiaoYangA").html(result.data.sparePartLiaoYangA + '吨');
                    $("#sparePartLiaoYangB").html(result.data.sparePartLiaoYangB + '吨');
                    $("#sparePartYingKou").html(result.data.sparePartYingKou + '吨');
                    $("#projectTotalWeight").html(result.data.projectTotalWeight + '吨');
                    $("#projectLiaoYangA").html(result.data.projectLiaoYangA + '吨');
                    $("#projectLiaoYangB").html(result.data.projectLiaoYangB + '吨');
                    $("#projectYingKou").html(result.data.projectYingKou + '吨');
                } else {
                    js.modal.warning(result.msg);
                }
            }
            , 'json');
    }

    /**
     *@FunctionName: rawMatMonthControl
     *@Description: 原料库月份控件初始化
     *@DesignIdea: 原料库月份控件初始化
     *@Author: 徐一贺
     *@CreateDate: 2020/5/18 20:51
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function rawMatMonthControl() {
        rawMatCurrentMonthAll = new Date().getMonth();
        $("#matIn").attr("href", "/material/reportForms/lists/1/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        $("#matOut").attr("href", "/material/reportForms/lists/2/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        $("#proToInv").attr("href", "/material/reportForms/lists/4/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        $("#matIn1").attr("href", "/material/reportForms/lists/5/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        $("#lbl_rawMatMonth").html(yearConvert(currentYearMat) + "年"+month[rawMatCurrentMonthAll] + '数据');
        loadRawMatDataByMont(rawMatCurrentMonthAll + 1);
    }

    /**
     *@FunctionName: rawMatMonthPre
     *@Description: 原料库上一月
     *@DesignIdea: 原料库上一月按钮事件
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:41
     *@Phone: 18241927380
     *@Version: v1.0.0
     */
    function rawMatMonthPre() {
        // if (rawMatCurrentMonthAll != 0) {
        //     rawMatCurrentMonthAll -= 1;
        //     $("#matIn").attr("href", "/material/reportForms/lists/1/" + rawMatCurrentMonthAll);
        //     $("#matOut").attr("href", "/material/reportForms/lists/2/" + rawMatCurrentMonthAll);
        //     $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + rawMatCurrentMonthAll);
        //     $("#proToInv").attr("href", "/material/reportForms/lists/4/" + rawMatCurrentMonthAll);
        //     $("#matIn1").attr("href", "/material/reportForms/lists/5/" + rawMatCurrentMonthAll);
        //     $("#lbl_rawMatMonth").html(month[rawMatCurrentMonthAll] + '数据');
        //     loadRawMatDataByMont(rawMatCurrentMonthAll + 1);
        // }
        if (rawMatCurrentMonthAll != 0) {
            rawMatCurrentMonthAll -= 1;
            $("#lbl_rawMatMonth").html(yearConvert(currentYearMat) + "年"+month[rawMatCurrentMonthAll] + '数据');
            loadRawMatDataByMont(rawMatCurrentMonthAll + 1);

            $("#matIn").attr("href", "/material/reportForms/lists/1/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matOut").attr("href", "/material/reportForms/lists/2/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#proToInv").attr("href", "/material/reportForms/lists/4/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matIn1").attr("href", "/material/reportForms/lists/5/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        } else {
            rawMatCurrentMonthAll = 11;
            currentYearMat -= 1;
            $("#lbl_rawMatMonth").html(yearConvert(currentYearMat) + "年"+month[rawMatCurrentMonthAll] + '数据');
            loadRawMatDataByMont(rawMatCurrentMonthAll + 1);

            $("#matIn").attr("href", "/material/reportForms/lists/1/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matOut").attr("href", "/material/reportForms/lists/2/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#proToInv").attr("href", "/material/reportForms/lists/4/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matIn1").attr("href", "/material/reportForms/lists/5/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        }

    }

    /**
     *@FunctionName: rawMatMonthPre
     *@Description: 原料库下一月
     *@DesignIdea: 原料库下一月按钮事件
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:41
     *@Phone: 18241927380
     *@Version: v1.0.0
     */
    function rawMatMonthNext() {
        // if (rawMatCurrentMonthAll != 11) {
        //     rawMatCurrentMonthAll += 1;
        //     $("#matIn").attr("href", "/material/reportForms/lists/1/" + rawMatCurrentMonthAll);
        //     $("#matOut").attr("href", "/material/reportForms/lists/2/" + rawMatCurrentMonthAll);
        //     $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + rawMatCurrentMonthAll);
        //     $("#proToInv").attr("href", "/material/reportForms/lists/4/" + rawMatCurrentMonthAll);
        //     $("#matIn1").attr("href", "/material/reportForms/lists/5/" + rawMatCurrentMonthAll);
        //     $("#lbl_rawMatMonth").html(month[rawMatCurrentMonthAll] + '数据');
        //     loadRawMatDataByMont(rawMatCurrentMonthAll + 1);
        // }

        if (rawMatCurrentMonthAll == 11 && currentYearMat <= new Date().getFullYear()) {
            rawMatCurrentMonthAll = 0;
            currentYearMat += 1;
            $("#lbl_rawMatMonth").html(yearConvert(currentYearMat) + "年"+month[rawMatCurrentMonthAll] + '数据');
            loadRawMatDataByMont(rawMatCurrentMonthAll + 1);
            $("#matIn").attr("href", "/material/reportForms/lists/1/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matOut").attr("href", "/material/reportForms/lists/2/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#proToInv").attr("href", "/material/reportForms/lists/4/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matIn1").attr("href", "/material/reportForms/lists/5/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        } else if ((rawMatCurrentMonthAll < 11 && currentYearMat < new Date().getFullYear()) || (rawMatCurrentMonthAll < new Date().getMonth() && currentYearMat == new Date().getFullYear())) {
            rawMatCurrentMonthAll += 1;
            $("#lbl_rawMatMonth").html(yearConvert(currentYearMat) + "年"+month[rawMatCurrentMonthAll] + '数据');
            loadRawMatDataByMont(rawMatCurrentMonthAll + 1);
            $("#matIn").attr("href", "/material/reportForms/lists/1/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matOut").attr("href", "/material/reportForms/lists/2/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#consumedInv").attr("href", "/material/reportForms/lists/3/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#proToInv").attr("href", "/material/reportForms/lists/4/" + currentYearMat + "/" + rawMatCurrentMonthAll);
            $("#matIn1").attr("href", "/material/reportForms/lists/5/" + currentYearMat + "/" + rawMatCurrentMonthAll);
        } else {
            js.modal.warning("未来数据不可查询！");
        }
    }

    /**
     *@FunctionName: rawMatMonthControl
     *@Description: 原料库月份控件初始化
     *@DesignIdea: 原料库月份控件初始化
     *@Author: 徐一贺
     *@CreateDate: 2020/5/19 9:03
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function loadRawMatDataByMont(month) {
        $.post(
            ctx + 'overview/index/loadRawMatDataByDate',
            {
                year: currentYearMat,
                month: month
            },
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    $("#rawMatInTotalWeight").html(result.data.rawMatInTotalWeight + '吨');
                    $("#rawMatOutTotalWeight").html(result.data.rawMatOutTotalWeight + '吨');
                    $("#rawMatConsumeTotalWeight").html(result.data.rawMatConsumeTotalWeight + '吨');
                    $("#rawMatSurplusTotalWeight").html(result.data.rawMatSurplusTotalWeight + '吨');
                    $("#rawMatReturnTotalWeight").html(result.data.rawMatReturnTotalWeight + '吨');
                } else {
                    js.modal.warning(result.msg);
                }
            }, 'json'
        )
    }

    /**
     *@FunctionName: loadRawMatApprovalPendingData
     *@Description: 加载原料库待审批数据
     *@DesignIdea: 加载原料库待审批数据
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 15:03
     *@Phone: 18241927380
     *@Version: v 1.0.0
     */
    function loadRawMatApprovalPendingData() {
        $.post(
            ctx + 'overview/index/loadRawMatApprovalPendingData',
            {},
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    $("#rawMatChangeCount").html(result.data.rawMatChangeCount);
                    $("#rawMatInvProCount").html(result.data.rawMatInvProCount);

                    $("#rawMatProInvCount").html(result.data.rawMatProInvCount);
                    $("#rawMatApprovalPendingCount").html(result.data.rawMatApprovalPendingCount);
                    // $("#rawMatNotSpecifiedCount").html(result.data.rawMatNotSpecifiedCount);
                    // $("#rawReturnMatTipsCount").html(result.data.rawReturnMatTipsCount);
                } else {
                    js.modal.warning(result.msg);
                }
            }, 'json'
        )
    }

    /**
     * 原料库结束
     */

    /**
     * 外购件库开始
     */
    /**
     *@FunctionName: loadPurchaseTopData
     *@Description: 加载外购件库顶部数据
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:49
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function loadPurchaseTopData() {
        js.post({
            url: ctx+'overview/index/loadPurchaseTopData',
            data: {},
            contentType: "application/json",
            async: false,
            success: function (result) {
                if (result.type === web_status.SUCCESS) {
                    if (hasP('overview:amount:view')) {
                        $("#inventoryInStockTotalAmountByPurchaseAndHalf").html(result.data.inventoryInStockTotalAmountByPurchaseAndHalf + '万');
                        $("#inventoryTotalAmountByPurchase").html(result.data.inventoryTotalAmountByPurchase + '万');
                        $("#projectInStockTotalAmountByPurchase").html(result.data.projectInStockTotalAmountByPurchase + '万');
                        $("#inventoryInStockTotalAmountByPurchase").html(result.data.inventoryInStockTotalAmountByPurchase + '万');
                        $("#mecLiaoYang").html(result.data.mecLiaoYang + '万');
                        $("#mecYingKou").html(result.data.mecYingKou + '万');
                        $("#mecLiaoYangConsWarehouse").html(result.data.mecLiaoYangConsWarehouse + '万');
                        $("#mecYingKouConsWarehouse").html(result.data.mecYingKouConsWarehouse + '万');
                        $("#mecLiaoYangPaintWarehouse").html(result.data.mecLiaoYangPaintWarehouse + '万');
                        $("#mecYingKouPaintWarehouse").html(result.data.mecYingKouPaintWarehouse + '万');
                    } else {
                        $("#inventoryInStockTotalAmountByPurchaseAndHalf").html("***");
                        $("#inventoryTotalAmountByPurchase").html("***");
                        $("#projectInStockTotalAmountByPurchase").html("***");
                        $("#inventoryInStockTotalAmountByPurchase").html("***");
                        $("#mecLiaoYang").html('***');
                        $("#mecYingKou").html('***');
                        $("#mecLiaoYangConsWarehouse").html("***");
                        $("#mecYingKouConsWarehouse").html("***");
                        $("#mecLiaoYangPaintWarehouse").html("***");
                        $("#mecYingKouPaintWarehouse").html("***");
                    }

                } else {
                    js.modal.warning(result.msg);
                }
            }
        });
        // $.post(
        //     ctx + 'overview/index/loadPurchaseTopData',
        //     {},
        //     false,
        //     function (result) {
        //         if (result.type === web_status.SUCCESS) {
        //             if (hasP('overview:amount:view')) {
        //                 $("#inventoryInStockTotalAmountByPurchaseAndHalf").html(result.data.inventoryInStockTotalAmountByPurchaseAndHalf + '万');
        //                 $("#inventoryTotalAmountByPurchase").html(result.data.inventoryTotalAmountByPurchase + '万');
        //                 $("#projectInStockTotalAmountByPurchase").html(result.data.projectInStockTotalAmountByPurchase + '万');
        //                 $("#inventoryInStockTotalAmountByPurchase").html(result.data.inventoryInStockTotalAmountByPurchase + '万');
        //                 $("#mecLiaoYang").html(result.data.mecLiaoYang + '万');
        //                 $("#mecYingKou").html(result.data.mecYingKou + '万');
        //                 $("#mecLiaoYangConsWarehouse").html(result.data.mecLiaoYangConsWarehouse + '万');
        //                 $("#mecYingKouConsWarehouse").html(result.data.mecYingKouConsWarehouse + '万');
        //                 $("#mecLiaoYangPaintWarehouse").html(result.data.mecLiaoYangPaintWarehouse + '万');
        //                 $("#mecYingKouPaintWarehouse").html(result.data.mecYingKouPaintWarehouse + '万');
        //             } else {
        //                 $("#inventoryInStockTotalAmountByPurchaseAndHalf").html("***");
        //                 $("#inventoryTotalAmountByPurchase").html("***");
        //                 $("#projectInStockTotalAmountByPurchase").html("***");
        //                 $("#inventoryInStockTotalAmountByPurchase").html("***");
        //                 $("#mecLiaoYang").html('***');
        //                 $("#mecYingKou").html('***');
        //             }
        //
        //         } else {
        //             js.modal.warning(result.msg);
        //         }
        //     }
        //     , 'json');
    }

    /**
     *@FunctionName: purMonthControl
     *@Description: 外购件库月份控件初始化
     *@DesignIdea: 外购件库月份控件初始化
     *@Author: 徐一贺
     *@CreateDate: 2020/5/18 20:51
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function purMonthControl() {
        purCurrentMonthAll = new Date().getMonth();
        $("#lbl_purMonth").html(yearConvert(currentYearPur) + "年" + month[purCurrentMonthAll] + '数据');
        loadPurDataByMont(purCurrentMonthAll + 1);
    }

    /**
     *@FunctionName: rawMatMonthPre
     *@Description: 外购件库上一月
     *@DesignIdea: 外购件库上一月按钮事件
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:41
     *@Phone: 18241927380
     *@Version: v1.0.0
     */
    function purMonthPre() {
        if (purCurrentMonthAll != 0) {
            purCurrentMonthAll -= 1;
            $("#lbl_purMonth").html(yearConvert(currentYearPur) + "年" +month[purCurrentMonthAll] + '数据');
            loadPurDataByMont(purCurrentMonthAll + 1);
        } else {
            purCurrentMonthAll = 11;
            currentYearPur -= 1;
            $("#lbl_purMonth").html(yearConvert(currentYearPur) + "年" +month[purCurrentMonthAll] + '数据');
            loadPurDataByMont(purCurrentMonthAll + 1);
        }
    }

    /**
     *@FunctionName: rawMatMonthPre
     *@Description: 外购件库下一月
     *@DesignIdea: 外购件库下一月按钮事件
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:41
     *@Phone: 18241927380
     *@Version: v1.0.0
     */
    function purMonthNext() {
        if (purCurrentMonthAll == 11 && currentYearPur <= new Date().getFullYear()) {
            purCurrentMonthAll = 0;
            currentYearPur += 1;
            $("#lbl_purMonth").html(yearConvert(currentYearPur) + "年" +month[purCurrentMonthAll] + '数据');
            loadPurDataByMont(purCurrentMonthAll + 1);
        } else if ((purCurrentMonthAll < 11 && currentYearPur < new Date().getFullYear()) || (purCurrentMonthAll < new Date().getMonth() && currentYearPur == new Date().getFullYear())) {
            purCurrentMonthAll += 1;
            $("#lbl_purMonth").html(yearConvert(currentYearPur) + "年" +month[purCurrentMonthAll] + '数据');
            loadPurDataByMont(purCurrentMonthAll + 1);
        } else {
            js.modal.warning("未来数据不可查询！");
        }
    }

    /**
     *@FunctionName: rawMatMonthControl
     *@Description: 外购件库月份控件初始化
     *@DesignIdea: 外购件库月份控件初始化
     *@Author: 徐一贺
     *@CreateDate: 2020/5/19 9:03
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function loadPurDataByMont(month) {
        $("#pur_middle").css("height", $("#pur_middle").innerHeight());
        let html = $("#pur_middle").html();
        $("#pur_middle").empty();
        $("#pur_middle").html("正在加载数据中...");
        $.post(
            ctx + 'overview/index/loadPurDataByDate',
            {
                year: currentYearPur,
                month: month
            },
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    $("#pur_middle").html(html);
                    if (hasP('overview:amount:view')) {
                        $("#purWarehousingAmountByMonth").html(result.data.purWarehousingAmountByMonth + '万');
                        $("#btn_purWarehousingAmountByMonth").attr("href", "/purWarQuery/index/index_in/" + result.data.purWarehousingAmountByMonth + "/" + currentYearPur + "/" + month);
                        $("#purOutWarehouseAmountByMonth").html(result.data.purOutWarehouseAmountByMonth + '万');
                        $("#btn_purOutWarehouseAmountByMonth").attr("href", "/purWarQuery/index/index_out/" + result.data.purOutWarehouseAmountByMonth + "/" + currentYearPur + "/" + month);
                        $("#purInvProAmountByMonth").html(result.data.purInvProAmountByMonth + '万');
                        $("#btn_purInvProAmountByMonth").attr("href", "/purchase/invPro/execPage/" + result.data.purInvProAmountByMonth + "/" + currentYearPur + "/" + month);
                        $("#purChangeAmountByMonth").html(result.data.purChangeAmountByMonth + '万');
                        $("#btn_purChangeAmountByMonth").attr("href", "/purchase/change/execPage/" + result.data.purChangeAmountByMonth + "/" + currentYearPur + "/" + month);
                        $("#purProInvAmountByMonth").html(result.data.purProInvAmountByMonth + '万');
                        $("#btn_purProInvAmountByMonth").attr("href", "/purchase/proInv/execPage/" + result.data.purProInvAmountByMonth + "/" + currentYearPur + "/" + month);
                    } else {
                        $("#purWarehousingAmountByMonth").html('***');
                        $("#purOutWarehouseAmountByMonth").html('***');
                        $("#purInvProAmountByMonth").html('***');
                        $("#purChangeAmountByMonth").html('***');
                        $("#purProInvAmountByMonth").html('***');
                    }

                } else {
                    js.modal.warning(result.msg);
                }
            }, 'json'
        )
    }

    /**
     *@FunctionName: loadRawMatApprovalPendingData
     *@Description: 加载外购件库待审批数据
     *@DesignIdea: 加载外购件库待审批数据
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 15:03
     *@Phone: 18241927380
     *@Version: v 1.0.0
     */
    function loadPurApprovalPendingData() {
        $.post(
            ctx + 'overview/index/loadPurApprovalPendingData',
            {},
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    $("#purChangeCount").html(result.data.purChangeCount);
                    $("#purInvProCount").html(result.data.purInvProCount);
                    $("#purProInvCount").html(result.data.purProInvCount);
                    $("#purApprovalPendingCount").html(result.data.purApprovalPendingCount);
                    // $("#purNotSpecifiedCount").html(result.data.purNotSpecifiedCount);
                    // $("#purNotSpecifiedCount2").html(result.data.purNotSpecifiedCount2);
                } else {
                    js.modal.warning(result.msg);
                }
            }, 'json'
        )
    }

    /**
     * 外购件库结束
     */

    /**
     * 成品库开始
     */
    /**
     *@FunctionName: loadHalfTopData
     *@Description: 加载成品库顶部数据
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:49
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function loadHalfTopData() {
        $.post(
            ctx + 'overview/index/loadHalfTopData',
            {},
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    if (hasP('overview:amount:view')) {
                        $("#inventoryInStockTotalAmountByHalf").html(result.data.inventoryInStockTotalAmountByHalf + '万');
                        $("#inventoryTotalAmountByHalf").html(result.data.inventoryTotalAmountByHalf + '万');
                    } else {
                        $("#inventoryInStockTotalAmountByHalf").html('***');
                        $("#inventoryTotalAmountByHalf").html('***');
                    }
                    $("#projectInStockTotalAmountByHalf").html(result.data.projectInStockTotalAmountByHalf);
                    $("#productionPartInStockCountByHalf").html(result.data.productionPartInStockCountByHalf);
                    $("#inventoryWeightByHalf").html(result.data.inventoryWeightByHalf + "吨");
                } else {
                    js.modal.warning(result.msg);
                }
            }
            , 'json');
    }

    /**
     *@FunctionName: halfMonthControl
     *@Description: 成品库月份控件初始化
     *@DesignIdea: 成品库份控件初始化
     *@Author: 徐一贺
     *@CreateDate: 2020/5/18 20:51
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function halfMonthControl() {
        halfCurrentMonthAll = new Date().getMonth();
        $("#lbl_halfMonth").html(yearConvert(currentYearHalf) + "年"+month[halfCurrentMonthAll] + '数据');
        loadHalfDataByMont(halfCurrentMonthAll + 1);
    }

    /**
     *@FunctionName: halfMonthPre
     *@Description: 成品库上一月
     *@DesignIdea: 成品库上一月按钮事件
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:41
     *@Phone: 18241927380
     *@Version: v1.0.0
     */
    function halfMonthPre() {
        // if (halfCurrentMonthAll != 0) {
        //     halfCurrentMonthAll -= 1;
        //     $("#lbl_halfMonth").html(month[halfCurrentMonthAll] + '数据');
        //     loadHalfDataByMont(halfCurrentMonthAll + 1);
        // }

        if (halfCurrentMonthAll != 0) {
            halfCurrentMonthAll -= 1;
            $("#lbl_halfMonth").html(yearConvert(currentYearHalf) + "年"+month[halfCurrentMonthAll] + '数据');
            loadHalfDataByMont(halfCurrentMonthAll + 1);
        } else {
            halfCurrentMonthAll = 11;
            currentYearHalf -= 1;
            $("#lbl_halfMonth").html(yearConvert(currentYearHalf) + "年"+month[halfCurrentMonthAll] + '数据');
            loadHalfDataByMont(halfCurrentMonthAll + 1);
        }
    }

    /**
     *@FunctionName: halfMonthNext
     *@Description: 成品库下一月
     *@DesignIdea: 成品库下一月按钮事件
     *@Author: 徐一贺
     *@CreateDate: 2020/5/20 8:41
     *@Phone: 18241927380
     *@Version: v1.0.0
     */
    function halfMonthNext() {
        // if (halfCurrentMonthAll != 11) {
        //     halfCurrentMonthAll += 1;
        //     $("#lbl_halfMonth").html(month[halfCurrentMonthAll] + '数据');
        //     loadHalfDataByMont(halfCurrentMonthAll + 1);
        // }
        if (halfCurrentMonthAll == 11 && currentYearHalf <= new Date().getFullYear()) {
            halfCurrentMonthAll = 0;
            currentYearHalf += 1;
            $("#lbl_halfMonth").html(yearConvert(currentYearHalf) + "年"+month[halfCurrentMonthAll] + '数据');
            loadHalfDataByMont(halfCurrentMonthAll + 1);
        } else if ((halfCurrentMonthAll < 11 && currentYearHalf < new Date().getFullYear()) || (halfCurrentMonthAll < new Date().getMonth() && currentYearHalf == new Date().getFullYear())) {
            halfCurrentMonthAll += 1;
            $("#lbl_halfMonth").html(yearConvert(currentYearHalf) + "年"+month[halfCurrentMonthAll] + '数据');
            loadHalfDataByMont(halfCurrentMonthAll + 1);
        } else {
            js.modal.warning("未来数据不可查询！");
        }
    }

    /**
     *@FunctionName: rawMatMonthControl
     *@Description: 成品库月份控件初始化
     *@DesignIdea: 成品库月份控件初始化
     *@Author: 徐一贺
     *@CreateDate: 2020/5/19 9:03
     *@Phone: 18241927380
     *@Version: 1.0.0
     */
    function loadHalfDataByMont(month) {
        $.post(
            ctx + 'overview/index/loadHalfDataByDate',
            {
                year: currentYearHalf,
                month: month
            },
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    if (hasP('overview:amount:view')) {
                        $("#purAndOutsourcingWarehousingAmountByMonth").html(result.data.purAndOutsourcingWarehousingAmountByMonth + '万');
                        $("#purAndOutsourcingOutWarehouseAmountByMonth").html(result.data.purAndOutsourcingOutWarehouseAmountByMonth + '万');
                        $("#aluminumWarehousingCountByMonth").html(result.data.aluminumWarehousingCountByMonth + '万');
                    } else {
                        $("#aluminumWarehousingCountByMonth").html('***');
                        $("#purAndOutsourcingWarehousingAmountByMonth").html('***');
                        $("#purAndOutsourcingOutWarehouseAmountByMonth").html('***');
                    }

                    $("#productionPartWarehousingCountByMonth").html(result.data.productionPartWarehousingCountByMonth);
                    $("#productionPartOutWarehouseCountByMonth").html(result.data.productionPartOutWarehouseCountByMonth);
                    $("#aluminumWarehousingWeightCountByMonth").html(result.data.aluminumWarehousingWeightCountByMonth + '吨');
                } else {
                    js.modal.warning(result.msg);
                }
            }, 'json'
        )
    }

    /**
     *@FunctionName: loadHalfApprovalPendingData
     *@Description: 加载成品库待审批数据
     *@DesignIdea: 加载成品库待审批数据
     *@Author: 徐一贺
     *@CreateDate: 2020/5/21 9:47
     *@Phone: 18241927380
     *@Version: v 1.0.0
     */
    function loadHalfApprovalPendingData() {
        $.post(
            ctx + 'overview/index/loadHalfApprovalPendingData',
            {},
            function (result) {
                if (result.type === web_status.SUCCESS) {
                    $("#halfChangeCount").html(result.data.halfChangeCount);
                    $("#halfInvProCount").html(result.data.halfInvProCount);
                    $("#halfProInvCount").html(result.data.halfProInvCount);
                    $("#halfApprovalPendingCount").html(result.data.halfApprovalPendingCount);
                    $("#halfAllocationCount").html(result.data.halfAllocationCount);
                } else {
                    js.modal.warning(result.msg);
                }
            }, 'json'
        )
    }

    /**
     * 成品库结束
     */

    /**
     * 小写转换成大写
     * @param year
     * @returns {string}
     */
    function yearConvert(year) {
        let yearStr = year.toString();
        let arr = yearStr.split("");
        let capitalFiguresArr = ["〇","一","二","三","四","五","六","七","八","九"];
        let resultStr = "";
        for (let i = 0; i < arr.length; i++) {
            resultStr += capitalFiguresArr[parseInt(arr[i])];
        }
        return resultStr;
    }
</script>
</body>
</html>